﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace App.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/

        public ActionResult Index()
        {
            Account account = GetCurrentAccount();
            if (account == null)
            {
                RedirectToAction("Index", "Account");
            }
            else
            {
                ViewData["PersonName"] = account.Name;
                IHomeBLL home = new HomeBLL();
                //在1.4版本中修改 
                ViewData["Menu"] = home.GetMenuByAccount(ref account);// 获取菜单
            }

            return View();
        }

    }
}
